package itheima.com.Day12;

import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;

public class PropertiesDemo2 {
    public static void main(String[] args) throws IOException {
        Properties properties = new Properties();
        properties.put("zhangsan","26");//键值对都必须是String类型
        properties.put("lisi","22");
        properties.put("wangba","29");
        //创建字符输出流写到本地文件
        FileWriter fw = new FileWriter("Master\\pro.properties");
        properties.store(fw,"");
//        System.out.println(properties);
        fw.close();

    }
}
